<template>
  <div class="treetotableDemo">
    <kunkka-tree-to-table
      :tree-data="fromData"
      :title="['left', 'right']"
      :tree-props="{ label: 'cQuyunames', children: 'childrenList' }"
      :right-props="rightProps"
      pid="sid"
      need-param="id"
      style="height:400px"
      @dispatchData="getPersonArr"
    />
  </div>
</template>

<script>
  import result from '../kunkka-tree/area'
  export default {
    props: {},
    data() {
      return {
        fromData: result.result.areaList,
        rightProps: [
          { label: '区域名称', prop: 'cQuyunames' }
        ]
      }
    },
    methods: {
      getPersonArr(arr) {
        console.log(arr)
      }
    }
  }

</script>
<style lang="scss">
.treetotableDemo {
  .table-transfer-left {
    width: calc(45% - 72px);
  }
  .table-transfer-right {
    width: calc(55% - 72px);
  }
}
</style>
